#! /bin/bash

if [ -n "$1"  ] ; then
    data_date="$1"
else
    data_date=$(date -d "-1 days" +%F)
fi

hive -e "
LOAD DATA INPATH '/warehouse/app_basic/t_md_areas/$data_date'  INTO TABLE jtp_app_ods.ods_md_areas
    PARTITION (dt = '$data_date') "







